const request = require('../utils/request')
const a = require('../utils/a')
const tokenCheck = function () {
  const token = localStorage.getItem('token')
  return new Promise(function (resolve, reject) {
    request.post('/api/user/tokenDecoder', {
      token
    })
      .then((data) => {
        resolve(data)
      })
  })
  // a.test()
  // let id = 1001
  // request.get('/api/shoppingCar', { id })
  //     .then((res) => {
  //         console.log(res)
  //     })
}
module.exports = {
  tokenCheck
}
